Real-Time Audio Sampling & Manipulation "Virtual Turntable Platter"
Hey everybody. Please allow me explain what I'm trying to achieve. Hopefully somebody can point me in the right direction to create this device. Thank you in advance.
I need to make a device that records & manipulates real-time audio from a mic or instrument channel that will allow me to speed up or slow down the incoming audio the same way a turntable would affect audio if you were to slow down or speed up the platter. I understand a buffer would be needed to create this "virtual turntable", but I'm not sure where to begin. I also don't want this device to loop. I simply need it to manipulate live audio & speed up/slow down the incoming live audio at a constant rate controlled by percentage. Any help where to begin would be very much appreciated. Thanks
use a delay line with a moveable tap (ie tapin~/tapout~)
Having a lot of trouble searching for proper tutorials on how to speed up/slow down audio via the tapin/tapout buffer suggestion mentioned above. I don't expect someone to baby step me the whole way through, but since MAX is a very complex program I'm struggling to navigate the manual. Choosing the shortest route in learning how to create this device without having to learn non related material is what I'm attempting, but failing miserably at the moment. Would anyone mind giving some more helpful tips in addition to the one "Floating Point" mentioned? Thank you fellas.
it's in the help file, just alter the delay: decreasing delay gives increase in pitch; no change in delay (constant delay) leaves pitch unaffected; increasing delay gives a decrease in pitch.
If you decrease the delay by 1 second every second you'll get a 1 octave increase in pitch and vice-versa;
btw
everything is related
Signal driven karma~? Slide~ is handy for motor style starts / stops.
Thanks for further input... I'm currently going though the Max course at kadenze.com... Hope I can start making this device soon-ish
- Well I've added a delay to the tapout. It speeds up & slows down the audio albeit not at a constant rate yet because I'm manually dragging the number. Unfortunately it sounds glitchy and full of clicks. Any tips on how to keep the playback speed at a constant rate & no glitches?
you should post your patch; if you want to keep the pitch constant, you'd need to keep the change in delay constant; maybe use line~ for that
I'm so frustrated right now. I've tried deconstructing other peoples patches, watched several hours of the basic Max course over at Kadenze & tried reading through the help files. I've been experimenting & failing over & over again. I can get the pitch to sort of go up & down with this idiotic patch I'm sharing a photo of, but the speed isn't effected... All I want to do is take a real time audio source, put that through a short audio buffer, then speed up or slow down the playback of the buffered audio at a constant switchable rate which should equally effect the pitch. The effect would be exactly like what would happen if you were to change the motor speed on a tape machine from 3.75 -7.5- 15 -30 IPS or change a record player motor speed from 33 - 45 - 78 RPM. I don't want any looping or any other bells and whistles. I'm struggling so hard with even the basics here. I apologize for bugging you guys, but I need some more guidance if you have the time. Thank you in advance.
![](https://cycling74-web-uploads.s3.amazonaws.com/55a4186544bf17c37aecdd79/2019-08-23T08:14:39Z/Screen Shot 2019-08-23 at 4.13.51 AM.png)
you're using two different types of delay. Either use tapin/tapout or delay~, no need for both. I'll post something else a bit later when I have time to patch something together, but the delay help file (2nd tab) has a working example of what you want
Here is a basic way.
You might be interested in learning more about modulated delay lines (for instance, MSP Delay Tutorials, including Flanger / Chorus).
here's my contribution:
ah just looked at JFC's patch-- mine is pretty much the same (but his is more succinct)
I greatly appreciate the help fellas & the time you took to put together these examples. I'll break down the patches & try to grasp some of this stuff this weekend. I'll have to learn how to make a circular delay & a continuously increasing offset.
here's version 0.2:
it uses a continuous offset so it is silent when there is no scrubbing (in the same way as when a turntable isn't moving it won't output a signal)
it has clicks when the offset goes back to zero, but this can be fixed by having two identical delays with the offsets are offset from each other and the delays cross-fade (i think) --need to think about that one a little
Again. I greatly appreciate all of your help!!!!! Unfortunately at the moment the patches that have been shared are beyond my knowledge. I'll never use the scrub function - although it is a cool effect. I'm strictly looking to take real-time audio and speed or slow it down at a set speed. I won't use any ramping up or down in speed...
What I'm trying to achieve with this MAX patch is to emulate an old technique music producers who used samplers such as the SP-1200 or SP-12 back in the late 80s-90s. The biggest problem with early samplers was their limited memory, which meant only a few seconds of sampled audio could be stored. Producers used a clever technique to obtain "more" sample time - though not without audio artifacts - by recording audio from a 33 1/3 RPM vinyl record into the sampler machine, but recording it into the sampler at a faster incorrect speed - 45 or 78 RPM - setting on the turntable. Once the sped up audio was recorded into the sampler, producers would pitch the sample back down. The artifacts of pitching the digitized sampled audio back down gave the audio a certain grainy "lofi" sound that is desired in some styles of music today....... So, my signal flow within Ableton will go something like this: Placed after a drum rack or audio signal I'll put 1 MAX patch set to speed up audio, following that will be a VST that emulates a SP-1200 DAC, last in the chain will be a duplicate of the same 1st MAX patch but set to slow back down the audio. All of what I'm trying to achieve can be done already, but not in realtime which is why I am here annoying you.... Hopefully you understood this lengthy explanation. But I felt it was necessary for you to understand what I'm trying to do. My apologies if I'm getting on your nerves, Cheers!!!
here's a version which does what you want in a basic way over 2 octaves:
if you encapsulate the tapin/tapout pair in a poly~ with the downsample argument you can lo-fi -ize it too
FP, this is a great patch!
Kris, [tapin~]/[tapout~] gives you a circular delay. You can't "continuously increase the delay" beyond the maximum"length of the tape" (i.e. duration of [tapin~]). Here, FP uses [count~] to playback a portion of the "tape" as a loop.
"Having a lot of trouble searching for proper tutorials on how to speed up/slow down audio via the tapin/tapout buffer suggestion mentioned above. I don't expect someone to baby step me the whole way through"
this is a matter of scaling, and yes, it can be a bit complicated at first.
imagine that a scrolling buffer has its own "tape speed" - which is 1.
so when you want to read from it, you just connect the tapout object (the playhead) to the tapin buffer, which reads from it with a speed of 1. in order to output the delayed input with the original speed.
so playing reversed at original speed can be reached by a speed of 0.
for example you can tell tapout to go from 1000 to 1000 in 1000 ms to play backwards or to go from 0 to 1000 in 500 ms to play a x2 speed.
Given the amount of confusion (mine included) about manipulating pitch with a delay line, I made a little table to outline the relation between pitch, playback speed, and "delta-tap" speed. It's pretty self explanatory.
the relation is (I think) delta_tap= 1- playback_speed and vice-versa
plus you must obeye not to exceed buffersize/2 as maximum in both directions, plus you must start pitching down before you can pitch up, then it is gettign even more complicated when you play backwards, and a few more things. :)
and how to come back to normal speed / no delay is a story on its own.
Roman, remember that it's a real-time input, so there is no "start" or "end" to the sound, so it is not necessary to go back to a particular point in the delay line or to continue from where the previous "note" finished. You could easily add to my patch so reverse playback starts tap-path at start of delay line and for forward playback the tap-path starts at the end... etc etc
I really appreciate the patches & all the information discussed. I'm going to continue breaking things down & experimenting until I can get what I'm looking for... Correct me if I'm wrong, but if I were to duplicate the last posted by Floating Point, set 2 different start times on them & quickly fade between both when one finishes & the other starts, could that potentially give me unlimited click free audio? When speeding down obviously...
Here is a version with a triangle envelope, and a second out-of-phase tap. More work is necessary if you want to get rid of the audio clicks at the moment when you change the playback speed.
re: start and endpoint
but the buffer has a start and end point, isnt it? if you have a buffer of 15 seconds and implement 10 seconds latency, you can go 5 seconds back and 5 seconds forward and not more.
Kris-- if you haven't already, have a look at JFC's patch-- it's great!
Roman-- true, but just a matter of looping
Just had more of a look at your patch Jean-Francois and if the pitch is not unison the two delays go out of sync with each other... need to add a "pre" delay offset to one of the delay lines? Have to think about that one...
Yes, the "going out of sync" is intentional in the previous patch, kind of a simple version of a granular delay.
Since we're at these delay lines, here is a version simplified to a non-transposing one-tap reverse delay.
OK, now I get it. They either have to go out of sync so they can play indefinitely, or stay in sync, but only for a finite amount of time (determined by the length of the delay) . And that second option goes against the whole point of overlapping-looping.
I made an installation with scratching of live audio and I just used groove~
You can use groove~ with a buffer and control the speed using a signal input.
I calculated/estimated the speed of the platter (jogwheel) from incoming midi data and used that to drive the groove~ object.
It works pretty well mostly. It depends on the source material though.
I wonder if some of these solutions would be better. I should try! Not sure if I'll get around to it though.
Very nice! I love the design of the machine!
Building on the previous examples on this thread, here is a four-tap synchronized granular delay. Add a lush reverb and make the tuning and reverse flag individual for each tap, you'll get Eventide-like Crystals/Reverse Crystals.
very useful, very nice-- with shorter loop times ("grain length") it would make a useful harmonizer; then put it in a poly~, connect to a midi controller and start singing!
Bringing this back from the dead, Floating Point, your patch that does it over 2 octaves is exactly what i want! Real time speed changing, however the looping thing isn't ideal. Would it be possible to turn the speed down and just let it ride like that for a solid 5-10 minutes